﻿namespace Mohe.Scada.WebApi.Cache
{
    public interface ICache
    {
        /// <summary>
        /// 存在
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        bool ContainKey(string key);


        /// <summary>
        /// 设置
        /// </summary>
        /// <param name="key"></param>
        /// <param name="value"></param>
        void SetCache(string key, object value);


        /// <summary>
        /// 取
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        object GetCache(string key);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="key"></param>
        void Remove(string key);

        /// <summary>
        /// 清空
        /// </summary>
        void Clear();


    }


}
